Fix the issue with "Shipping address is not set" exception#16753
Conversation
|
Hi @dmytro-ch. Thank you for your contribution
For more details, please, review the Magento Contributor Assistant documentation |
rogyar
left a comment
There was a problem hiding this comment.
Hi @dmytro-ch. Thank you for your collaboration. That's great that we have a fix, but we should slightly improve it. Let me share my thoughts. The apply method has nothing to do with the redirection. It's just a service method that sets a shipping method. So, that's absolutely normal that it throws the exception when there's no shipping address set. Other 3rd party extensions or custom implementations might expect this behavior and it's logical. So, it's not good for us to change logic on such a low level of implementation.
To fix the redirection issue, we need to find a logical part that is responsible for the redirection and make changes there. I.e. catch the StateException (or bring the StateException to this point if it's being caught somewhere else) and perform the corresponding checks/actions.
|
@dmytro-ch are you going to proceed with this one? |
|
@rogyar I will update this PR till the end of the week. Thank you! |
|
@rogyar I've updated the PR. Could you please check the result? |
|
Hi @rogyar, thank you for the review. |
|
Hi @dmytro-ch. Thank you for your contribution. Please, consider to port this solution to 2.3 release line. |
The exception is being thrown instead of redirecting the customer to New Shipping Address form.
Description
The issues appeared because of the interrupted shipment assignment process.
As result:
Magento\Framework\Exception\StateException) is not caught and the customer is not redirected tomultishipping/checkout_address/newShippingpage.quote_addresstable due to the interrupted process of quote saving byMagento\Framework\Exception\StateException. It causes the additional error on Shopping Cart page, after performing the steps mentioned in Manual testing scenarios. (Fixed in: 6f88af5)Fixed Issues
Manual testing scenarios
Contribution checklist